package com.qk.management.statemachine.status;

import lombok.Getter;

// ClueStatus.java
@Getter
public enum ClueStatus {
    WAITING(1),        // 待分配
    ASSIGNED(2),       // 已分配
    FOLLOWING(3),      // 跟进中
    PSEUDO_CLUES(4),   // 伪线索
    BUSINESS(5);       // 转为商机


    private final int code;

    ClueStatus(int code) {
        this.code = code;
    }

    public static ClueStatus fromCode(int code) {
        for (ClueStatus status : ClueStatus.values()) {
            if (status.getCode() == code) {
                return status;
            }
        }
        throw new IllegalArgumentException("未知的状态码: " + code);
    }


}

